<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>背景颜色和背景图片</title>
		<style type="text/css">
			div{
				width: 100px;
				height: 100px;
				background-image: url(../img/i.jpg);
				/*容器宽高分别为100px，则80%相当于图片的宽高都是80px*/
				background-size: 80% 80%; 
			}
			p{
				background-color: yellow;
			}
		</style>
	</head>
	<body>
		<div></div>
		<p>设置段落的背景颜色为黄色</p>
	</body>
</html>
